import java.util.Scanner;

public class FactorialTest {
    public static void main(String[] args) {
//        求阶乘
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int result = factorial(n);
        System.out.println(result);
        }
    public static int factorial(int n){
        int num = 1;
        for (int i = 1; i <= n; i++) {
            num *= i;  // 逐步乘以 1, 2, ..., n
        }
        return num;
    }
}
